package com.ayu.shortlink.admin.mq.consumer;

import com.ayu.shortlink.admin.mq.basics.base.MessageWrapper;
import com.ayu.shortlink.admin.mq.basics.event.UserGainCouponEvent;
import lombok.RequiredArgsConstructor;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import static com.ayu.shortlink.admin.common.constant.RocketMQConstant.GROUP_USER_GAIN_COUPON;
import static com.ayu.shortlink.admin.common.constant.RocketMQConstant.TOPIC_USER_GAIN_COUPON;

/**
 * 用户获取优惠券消费者
 */
@Component
@RequiredArgsConstructor
@RocketMQMessageListener(
        topic = TOPIC_USER_GAIN_COUPON,
        consumerGroup = GROUP_USER_GAIN_COUPON
)
public class UserGainCouponConsumer implements RocketMQListener<MessageWrapper<UserGainCouponEvent>> {


    // TODO 进行用户获取优惠券
    @Override
    public void onMessage(MessageWrapper<UserGainCouponEvent> userGainCouponEventMessageWrapper) {

    }
}
